var num = 0;

function count(){
    // if(localStorage.num){
    //     num = localStorage.num;
    // };
    postMessage(num);
    num++;
    // localStorage.num = num;
    setTimeout(count,1000);
};
count();